package com.example.final_project.Usr.Activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.ImageView;

import com.example.final_project.Home.frag.HomeFragment;
import com.example.final_project.MainView;
import com.example.final_project.R;

public class MyCarActivity extends AppCompatActivity {

    private ImageView back;
    private EditText type,num;
    private Button ok;
    private CheckBox check;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_car);

        //相关控件绑定
        findById();
        //设置返回按钮点击事件
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MyCarActivity.this, MainView.class);
                intent.setAction("backToUserFrag");
                startActivity(intent);
            }
        });

    }

    //相关控件绑定
    public void findById(){
        back = this.findViewById(R.id.mycar_back);
        type = this.findViewById(R.id.mycar_type);
        num = this.findViewById(R.id.mycar_num);
        ok = this.findViewById(R.id.mycar_ok);
        check = this.findViewById(R.id.mycar_agree);
    }

}